clear
**** Figure 1 ****
use fig1_salt_distribution1.dta
graph bar saltdeliveredkg, over(month, sort(var4) label(angle(45))) blabel(total) ///
ytitle(Amount of salt delivered (kg)) title(Fig 1: Monthly distribution of double fortified salt (Kg), size(medium))


*** Figure 2  ****
clear
use Jehanabad_analytic_sample_hemoglobin.dta
kdensity hemoglobin, nograph generate(x fx)
kdensity hemoglobin if wave==0, nograph generate(fx0) at(x)
kdensity hemoglobin if wave==1, nograph generate(fx1) at(x)
label var fx0 "Pre-treatment"
label var fx1 "Post-treatment"
line fx0 fx1 x, sort ytitle(Density) xtitle(Hemoglobin levels (g\dL)) title("Fig 2: Kernel density of hemoglobin (Pre and Post)", size(medium))

*** Figure 3 ***
clear
use Jehanabad_analytic_sample_hemoglobin.dta
keep child_unique wave hemoglobin total_attendance_2 school_id
sort child_unique wave

g el_att= total_attendance_2
replace el_att= total_attendance_2[_n+1] if wave==0
g bl_hb= hemoglobin
replace bl_hb= hemoglobin[_n-1] if wave==1

keep if wave==1

twoway (lpolyci el_att bl_hb), graphregion(color(white)) saving(fig3, replace)xtitle("Baseline hemoglobin levels (g/dL)") ///
title("Fig 3: Child attendance and baseline Hb levels",  size(medium)) ///
note("Notes: This figure plots a local linear regression of the endline attendance rate of students with respect to" "their baseline Hb levels.") ///
legend(label( 2 "Local polynomial smooth"))


close
